import Vue from 'vue'

import 'normalize.css/normalize.css'// A modern alternative to CSS resets
import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
import Element from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

import '@/styles/index.scss' // global css

import App from './App'
import router from './router'
import store from './store'

import i18n from './lang' // Internationalization
import './icons' // icon
import './errorLog'// error log
import './permission' // permission control
import './mock' // simulation data
// import VueAMap from 'vue-amap'
import * as filters from './filters' // global filters
// eslint-disable-next-line no-unused-vars
// import $http from '@/utils/request'
// import VueAMap from 'vue-amap'

Vue.use(Element, {
  size: 'medium', // set element-ui default size
  zhLocale
})

// Vue.use(VueAMap)
// VueAMap.initAMapApiLoader({
//   key: '644c00282ed16e6b95765ee0892149fb',
//   plugin: ['Geocoder', 'AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PolyEditor', 'AMap.CircleEditor'],
//   // 默认高德 sdk 版本为 1.4.4
//   v: '1.4.12'
// })

// register global utility filters.
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})

Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  store,
  i18n,
  render: h => h(App)
})
